---
title: Internationalization
---

<Callout type="warning" title="Caution">
  Not all plugins include language packs. We will specify this in the documentation for each feature.
</Callout>

## `mergeLocales` Method [#mergeLocales]

`mergeLocales` Method is used to merge multiple plugin or preset language packs into a complete language pack object. You can use it as follows:

<Tabs items={['Preset Mode', 'Plugin Mode']}>
  <Tab>
    ```typescript
    import { mergeLocales } from '@univerjs/presets'

    // You can pass multiple language pack objects to merge
    const locales = mergeLocales(
      plugin1Locales,
      plugin2Locales,
      presetLocales,
    )
    // You can also pass an array of language pack objects
    const locales = mergeLocales([
      plugin1Locales,
      plugin2Locales,
      presetLocales,
    ])
    ```
  </Tab>
  <Tab>
    ```typescript
    import { mergeLocales } from '@univerjs/core'

    // You can pass multiple language pack objects to merge
    const locales = mergeLocales(
      plugin1Locales,
      plugin2Locales,
      presetLocales,
    )
    // You can also pass an array of language pack objects
    const locales = mergeLocales([
      plugin1Locales,
      plugin2Locales,
      presetLocales,
    ])
    ```
  </Tab>
</Tabs>

## Custom Language Packs

Univer also supports custom language packs. You can assemble a language pack object as needed and pass it to the `Univer` instance. The preset language packs are generally stored in the `<rootDir>/packages/<PLUGIN_NAME>/locale` directory.

```typescript
const univer = new Univer({
  locale: 'ja-JP',
  locales: {
    'ja-JP': {
      shortcut: {
        undo: '元に戻す',
        redo: 'やり直す',
      },
    },
  },
})
```

## Contributing Translations

Univer currently provides the following built-in language packs:

- `zh-CN`: Simplified Chinese
- `en-US`: English
- `zh-TW`: Traditional Chinese
- `ru-RU`: Russian
- `vi-VN`: Vietnamese
- `fa-IR`: Persian
- `fr-FR`: French
- `ko-KR`: Korean
- `es-ES`: Spanish
- `ca-ES`: Catalan

Univer OSS is an open source project full of inclusiveness, and we welcome developers from all over the world to add or improve locales for Univer.
